from sqlalchemy import Column, Integer, String, func, DateTime, JSON, Boolean, ForeignKey
from sqlalchemy.orm import relationship

from models import Base


class Project(Base):
    """项目表"""
    id = Column(Integer, primary_key=True, index=True, autoincrement=True)
    name = Column(String(50), unique=True, nullable=False, comment='项目名称')
    version = Column(String(30), nullable=False, comment='项目版本')
    description = Column(String(200), comment='项目描述')
    createName = Column(String(20), nullable=False, comment='创建者')
    updateName = Column(String(20), comment='最后更新人')
    status = Column(Boolean, default=True, comment='状态')

    # caseSuite = relationship('CaseSuite')
    # projectId = Column(Integer, ForeignKey('project.id', ondelete='CASCADE'), nullable=False, comment='项目ID')
